#ifndef _FM_COMMON_H_
#define _FM_COMMON_H_

#include <string>
namespace fm_comm {

const unsigned int kFeaMaxSize = 20000;
const unsigned int kQureyFaceMinSize = 1;
const unsigned int kQureyFaceMaxSize = 20;

const unsigned int kFaceImgSize = 256 * 1024;            //模板图大小
const unsigned int kFaceYuvImgSize = 640 * 640 * 3 / 2;  //模板图大小
// recapp http Server Port
const unsigned int kRAHttpPort = 9001;
// MainApp http Server Port
const unsigned int kMainAppHttpPort = 9000;
const char kRAHttpExPlatformUrl[] = "/api/v1.0/ExPlatform";
const char kRAHttpMainUrl[] = "/api/v1.0/main";
// recapp http uri
const char kRAHttpRecUrl[] = "/api/v1.0/faceapp";
const char kRAHttpImgsUrl[] = "/imgs/";

const char kFaceDbDir[] = "/data/db/fm/";
const char kFaceDbName[] = "/data/db/fm/ufeainfo";
const char kFaceDbModelDir[] = "/data/db/fm/model/";

const char kFaceRecDir[] = "/data/img/record/";  //人脸识别结果主目录
const char kFaceRecDirImgface[] =
    "/data/img/record/imgface/";  //人脸识别结果小图
const char kFaceRecDirImg[] = "/data/img/record/img/";  //人脸识别结果大图
const char kFaceRecdb[] = "/data/img/record/recdb";
const char kStrangerID[] = "5a0a62db1da64e9f4efadd3c6b0b08ce";
const char kHttpWebDir[] = "/app/exec/WWW/";  // Http Server Work Dir

const char kFaceDbCfg[] = "/data/db/cfg/";  //设备配置主接口
const char zbxMqttCfg[] = "/data/db/cfg/zbxMqttCfg";  //设备配置主接口
const char usrCfg[] = "/home/admin/LSCFG.json";  //设备配置主接口

const char kSystemDefaultCfg[] = "/app/exec/Defaultcfg.json";  //系统默认配置


//常量定义
const unsigned int kFeatureSize = 2048;

// CommInfo
const char efm_comm_req[] = "req";
const char efm_comm_code[] = "code";
const char efm_comm_msg[] = "msg";
const char efm_comm_body[] = "body";
const char efm_comm_data[] = "data";
const char efm_comm_cmd[] = "cmd";
const char efm_comm_usrid[] = "usrid";
const char efm_comm_usrids[] = "usrids";
const char efm_comm_name[] = "name";
const char efm_comm_offset[] = "offset";
const char efm_comm_limit[] = "limit";
const char efm_comm_fea[] = "fea";
const char efm_comm_exinfo[] = "exinfo";

const char efm_comm_total[] = "total";
const char efm_comm_totalface[] = "totalface";
const char efm_comm_max[] = "max";
const char efm_comm_version[] = "version";
const char efm_comm_userinfo[] = "userinfo";
const char efm_comm_userinfos[] = "userinfos";
const char efm_comm_islast[] = "islast";
const char efm_comm_count[] = "count";

const char efm_comm_delall[] = "delall";
const char efm_comm_onlydelface[] = "onlydelface";

const char efm_comm_faceimg[] = "faceimg";
const char efm_comm_faceimglen[] = "faceimglen";
const char efm_comm_img[] = "img";
const char efm_comm_imglen[] = "imglen";
const char efm_comm_Urlfaimg[] = "urlfaimg";

const char efm_comm_faimg[] = "faimg";
const char efm_comm_faimglen[] = "faimglen";
const char efm_comm_seq[] = "seq";
const char efm_comm_time[] = "time";
const char efm_comm_score[] = "score";
const char efm_comm_attr[] = "attr";
const char efm_comm_attrhat[] = "hat";
const char efm_comm_attrmask[] = "mask";
const char efm_comm_attrspoof[] = "spoof";
const char efm_comm_temp[] = "temp";

// GetDevInfo
const char efm_comm_sn[] = "sn";
const char efm_comm_mac[] = "mac";
const char efm_comm_appBuildTime[] = "appBuildTime";
const char efm_comm_appVersion[] = "appVersion";
const char efm_comm_fwVersion[] = "fwVersion";
const char efm_comm_DevName[] = "DevName";
const char efm_comm_HwVer[] = "HwVer";

const char efm_comm_enable[] = "enable";

// Cmd RecApp

const char efm_cmd_addface[] = "addface";
const char efm_cmd_addfacebyfa[] = "addfacebyfa";
const char efm_cmd_qureyface[] = "qureyface";
const char efm_cmd_delface[] = "delface";
const char efm_cmd_qureydbinfo[] = "qureydbinfo";
const char efm_cmd_qureyResult[] = "qureyResult";
const char efm_cmd_faceResult[] = "faceResult";
const char efm_cmd_qureyhealthresult[] = "qureyhcrecord";
const char efm_cmd_calcfea[] = "calcfea";
const char efm_cmd_QrResult[] = "QrResult";
const char efm_comm_qr[] = "qr";

const char efm_cmd_IdResult[] = "IdResult";
const char efm_comm_idcard[] = "idcard";
const char efm_cmd_UpdateParam[] = "UpdateParam";
const char efm_cmd_IcResult[] = "IcResult";
const char efm_cmd_type[] = "type";

const char efm_comm_Gender[] = "Gender";
const char efm_comm_National[] = "National";
const char efm_comm_Address[] = "Address";

const char efm_comm_Birthday[] = "Birthday";
const char efm_comm_Maker[] = "Maker";
const char efm_comm_StartDate[] = "StartDate";
const char efm_comm_EndDate[] = "EndDate";
const char efm_comm_IdImg[] = "IdImg";

// AuthInfo
// const char efm_comm_name[] = "name";
const char efm_comm_passwd[] = "passwd";

// setNetCfg
const char efm_comm_dhcp[] = "dhcp";
const char efm_comm_ip[] = "ip";
const char efm_comm_mask[] = "mask";
const char efm_comm_gateway[] = "gateway";
const char efm_comm_dns[] = "dns";
const char efm_comm_dns1[] = "dns1";

// LedInfo
const char efm_comm_mode[] = "mode";
const char efm_comm_value[] = "value";

// cmd mainApp
const char efm_cmd_getDevInfo[] = "getDevInfo";
const char efm_cmd_setDevName[] = "setDevName";
const char efm_cmd_setAuthInfo[] = "setAuthInfo";
const char efm_cmd_RebootSystem[] = "RebootSystem";
const char efm_cmd_getNetCfg[] = "getNetCfg";
const char efm_cmd_setNetCfg[] = "setNetCfg";
const char efm_cmd_OpenDoor[] = "OpenDoor";

const char efm_cmd_setLedInfo[] = "setLedInfo";
const char efm_cmd_getLedInfo[] = "getLedInfo";

const char efm_cmd_resetParam[] = "resetParam";
const char efm_cmd_PlayVioce[] = "PlayVioce";

const char efm_cmd_addIcCard[] = "addIcCard";

const char efm_cmd_Snap[] = "Snap";

const char efm_cmd_setAlogParam[] = "setAlogParam";
const char efm_cmd_getAlogParam[] = "getAlogParam";

const char efm_cmd_setRecMode[] = "setRecMode";
const char efm_cmd_getRecMode[] = "getRecMode";

const char efm_cmd_setHttpServer[] = "setHttpServer";
const char efm_cmd_getHttpServer[] = "getHttpServer";

const char efm_cmd_setMqttServer[] = "setMqttServer";
const char efm_cmd_getMqttServer[] = "getMqttServer";

// WS Server
const char efm_cmd_setWsServer[] = "setWsServer";
const char efm_cmd_getWsServer[] = "getWsServer";

//费马  FaceManagge
const char efm_cmd_setfmFaceManage[] = "setfmFaceManage";
const char efm_cmd_getfmFaceManage[] = "getfmFaceManage";

//超级管理员IC卡
const char efm_cmd_setAdminIc[] = "setAdminIc";
const char efm_cmd_getAdminIc[] = "getAdminIc";

// cfg file
const char efm_cfg_DevName[] = "cfgDevName";
const char efm_cfg_AuthInfo[] = "cfgAuthInfo";
const char efm_cfg_NetCfg[] = "cfgNetCfg";

const char efm_cfg_HttpServer[] = "cfgHttpServer";
const char efm_cfg_MqttServer[] = "cfgMqttServer";
const char efm_cfg_fmFaceManage[] = "cfgfmFaceManage";
const char efm_cfg_WsServer[] = "cfgWsServer";
const char efm_cfg_AlogParam[] = "cfgAlogParam";
const char efm_cfg_RecMode[] = "cfgRecMode";
const char efm_cfg_LedInfo[] = "cfgLedInfo";
const char efm_cfg_AdminIc[] = "cfgAdminIc";
const char efm_cfg_Time[] = "cfgTime";
const char efm_cfg_HcCfg[] = "cfgHcCfg";

//健康码，IC卡
const char efm_hc_page[] = "page";
const char efm_hc_limit[] = "limit";
const char efm_hc_timestart[] = "timestart";
const char efm_hc_timeend[] = "timeend";
const char efm_hc_healthstatus[] = "healthstatus";
const char efm_ic_num[] = "ic";
const char efm_comm_icaddusr[] = "icaddusr";
const char efm_comm_icdelusr[] = "icdelusr";
const char efm_comm_icaddic[] = "icaddic";
const char efm_comm_icdelic[] = "icdelic";
const char efm_comm_status[] = "status";

const char efm_comm_appkey[] = "appkey";
const char efm_comm_params[] = "params";
const char efm_comm_key[] = "key";
const char efm_comm_lists[] = "lists";
const char efm_comm_innername[] = "innername";
const char efm_comm_dis[] = "dis";

const char efm_comm_ntp[] = "ntp";
const char efm_comm_url[] = "url";

const char efm_cmd_getHcCfg[] = "getHcCfg";
const char efm_cmd_setHcCfg[] = "setHcCfg";

const char efm_cmd_getTime[] = "getTime";
const char efm_cmd_setTime[] = "setTime";

const char efm_cmd_qureyPlatformList[] = "qureyPlatformList";
const char efm_cmd_getPlatformParam[] = "getPlatformParam";
const char efm_cmd_setPlatformParam[] = "setPlatformParam";
const char efm_cmd_addPlatformCompany[] = "addPlatformCompany";
const char efm_cmd_addPlatformGroup[] = "addPlatformGroup";
const char efm_cmd_ExplatformInputUser[] = "ExplatformInputUser";
const char efm_cmd_IdcardFaceCollect[] = "IdcardFaceCollect";

// const char efm_cmd_setTime[] = "setTime";

enum FmSytemCode {
    kCodeSystemError = -255,     //系统错误
    kCodeImgFaceMutilFace = -4,  //图片没有人脸信息
    kCodeImgNoFace = -3,         //图片没有人脸信息
    kCodeImgFormatError = -2,    //图片解析错误
    kCodeError = -1,
    kCodeOK = 0,
};
}  // namespace fm_comm

#endif
